package com.me.mysqladmin.entity;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

public class SQLCommand implements Serializable {
	private static final long serialVersionUID = 1L;

	// sql语句
	private String sql;
	
	// 类型（查询 or 非查询）
	private String type;
	
	// 如果为查询sql时，用该属性封装
	private List<Map<String, Object>> rs;
	
	// 如果是非查询sql，记录受影响行数
	private Integer lines;

	public String getSql() {
		return sql;
	}

	public void setSql(String sql) {
		this.sql = sql;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public List<Map<String, Object>> getRs() {
		return rs;
	}

	public void setRs(List<Map<String, Object>> rs) {
		this.rs = rs;
	}

	public Integer getLines() {
		return lines;
	}

	public void setLines(Integer lines) {
		this.lines = lines;
	}

	@Override
	public String toString() {
		return "SQLCommand [sql=" + sql + ", type=" + type + ", rs=" + rs
				+ ", lines=" + lines + "]";
	}
}
